<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui" template="template.xhtml">

	<ui:define name="main">
		<h:form id="formCamera">
			<div class="header header_cameras" />
			<p:panel id="painelCadastro" header="#{msgs.cadastro_cameras}"
				styleClass="painelCadastro">
				<h:panelGrid columns="2">
					<h:outputLabel value="#{msgs.nome_camera}#{msgs.dois_pontos}" />
					<p:inputText id="NomeCamera"
						value="#{cameraBean.camera.nomeCamera}" maxlength="45"
						required="true">
						<p:message for="NomeCamera" />
					</p:inputText>
					<h:outputLabel value="#{msgs.descricao_camera}#{msgs.dois_pontos}" />
					<p:inputText id="desc_camera" required="true"
						value="#{cameraBean.camera.descCamera}" maxlength="70" size="70">
						<p:message for="desc_camera" />
					</p:inputText>
					<h:outputLabel value="#{msgs.perfis_camera}#{msgs.dois_pontos}" />
					<p:pickList value="#{cameraBean.perfis}" var="perfil"
						itemValue="#{perfil}" itemLabel="#{perfil.nome}"
						converter="br.com.pirralhos.view.converter.PerfilConverter"
						addLabel="#{msgs.adicionar}" addAllLabel="#{msgs.adicionar_todos}"
						removeLabel="#{msgs.remover}" id="painel"
						removeAllLabel="#{msgs.remover_todos}" />
				</h:panelGrid>

			</p:panel>
			<h:panelGrid styleClass="painelBotoes" columns="2">
				<p:commandButton value="#{msgs.botao_gravar}"
					action="#{cameraBean.gravar}"
					update="painelConsulta, painelCadastro" ajax="false" />
				<p:commandButton value="#{msgs.botao_limpar}"
					action="#{cameraBean.limpar}" update="painelCadastro"
					process="@this" />
			</h:panelGrid>
			<h:panelGrid style="height:100px" columns="2">
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
